﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="MyWorkshops.aspx.vb" Inherits="TWIN_test.MyWorkshops" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body background="../../Images/Training-Employee-Background.gif">
    <form id="form1" runat="server">
    <center><div>
        My Workshops
        <asp:GridView 
            ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" DataMember="DefaultView" AutoGenerateSelectButton="True"
            BackColor="White" BorderColor="White" BorderStyle="None" BorderWidth="5px" 
            CellPadding="2" CellSpacing="2">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
                <asp:BoundField DataField="TITLE" HeaderText="TITLE" SortExpression="TITLE" />
                <asp:BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" SortExpression="DESCRIPTION" />
            </Columns>
        </asp:GridView>

        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
            
            SelectCommand="SELECT WORKSHOP.ID, WORKSHOP.TITLE, WORKSHOP.DESCRIPTION FROM WORKSHOP, WORKSHOPS_TAKEN WHERE WORKSHOP.ID = WORKSHOPS_TAKEN.WORKSHOP_ID AND WORKSHOPS_TAKEN.USERNAME = :USERID">
            <SelectParameters>
                <asp:Parameter DbType="String" Name="USERID" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        
        <asp:Button ID="Button1" runat="server" Text="Back" />
    </div>
    </center>
    </form>
</body>
</html>
